<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>std.metastrings</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "std.metastrings";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/std.metastrings.html" class="symbol">std.metastrings</a></h1>
  
<div class="summary">Templates with which to do compile time manipulation of strings.</div>
<dl>
<dt class="decl">template <a class="symbol _template" name="Format" href="./htmlsrc/std.metastrings.html#L43" kind="template" beg="43" end="52">Format</a><span class="tparams">(A...)</span>; <a title="Permalink to this symbol" href="#Format" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L43">#</a></dt>
<dd class="ddef">
<div class="summary">Formats constants into a string at compile time.
 Analogous to std.string.format().</div>
<p class="sec_header">Parameters:</p>A =	tuple of constants, which can be strings,
		characters, or integral values.
<p class="sec_header">Formats:</p>The formats supported are %s for strings, and %%
	for the % character.
<p class="sec_header">Example:</p><pre class="d_code">
<span class="k">import</span> <span class="i">std</span>.<span class="i">metastrings</span>;
<span class="k">import</span> <span class="i">std</span>.<span class="i">stdio</span>;

<span class="k">void</span> <span class="i">main</span>()
{
  <span class="i">string</span> <span class="i">s</span> = <span class="i">Format</span>!(<span class="sl">"Arg %s = %s"</span>, <span class="sl">"foo"</span>, <span class="n">27</span>);
  <span class="i">writefln</span>(<span class="i">s</span>); <span class="lc">// "Arg foo = 27"</span>
}
</pre>
<dl>
<dt class="decl">char[] <a class="symbol _variable" name="Format.Format" href="./htmlsrc/std.metastrings.html#L46" kind="variable" beg="46" end="46">Format</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#Format.Format" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L46">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">template <a class="symbol _template" name="FormatString" href="./htmlsrc/std.metastrings.html#L54" kind="template" beg="54" end="68">FormatString</a><span class="tparams">(string F, A...)</span>; <a title="Permalink to this symbol" href="#FormatString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L54">#</a></dt>
<dd class="ddef">
<dl>
<dt class="decl">char[] <a class="symbol _variable" name="FormatString.FormatString" href="./htmlsrc/std.metastrings.html#L57" kind="variable" beg="57" end="57">FormatString</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#FormatString.FormatString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L57">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">template <a class="symbol _template" name="ToString" href="./htmlsrc/std.metastrings.html#L74" kind="template" beg="74" end="80">ToString</a><span class="tparams">(ulong U)</span>; <a title="Permalink to this symbol" href="#ToString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L74">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:2" href="./htmlsrc/std.metastrings.html#L83" kind="template" beg="83" end="89">ToString</a><span class="tparams">(long I)</span>; <a title="Permalink to this symbol" href="#ToString:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L83">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:3" href="./htmlsrc/std.metastrings.html#L94" kind="template" beg="94" end="97">ToString</a><span class="tparams">(uint U)</span>; <a title="Permalink to this symbol" href="#ToString:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L94">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:4" href="./htmlsrc/std.metastrings.html#L100" kind="template" beg="100" end="103">ToString</a><span class="tparams">(int I)</span>; <a title="Permalink to this symbol" href="#ToString:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L100">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:5" href="./htmlsrc/std.metastrings.html#L106" kind="template" beg="106" end="109">ToString</a><span class="tparams">(ushort U)</span>; <a title="Permalink to this symbol" href="#ToString:5" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L106">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:6" href="./htmlsrc/std.metastrings.html#L112" kind="template" beg="112" end="115">ToString</a><span class="tparams">(short I)</span>; <a title="Permalink to this symbol" href="#ToString:6" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L112">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:7" href="./htmlsrc/std.metastrings.html#L118" kind="template" beg="118" end="121">ToString</a><span class="tparams">(ubyte U)</span>; <a title="Permalink to this symbol" href="#ToString:7" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L118">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:8" href="./htmlsrc/std.metastrings.html#L124" kind="template" beg="124" end="127">ToString</a><span class="tparams">(byte I)</span>; <a title="Permalink to this symbol" href="#ToString:8" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L124">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:9" href="./htmlsrc/std.metastrings.html#L130" kind="template" beg="130" end="133">ToString</a><span class="tparams">(bool B)</span>; <a title="Permalink to this symbol" href="#ToString:9" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L130">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:10" href="./htmlsrc/std.metastrings.html#L136" kind="template" beg="136" end="139">ToString</a><span class="tparams">(string S)</span>; <a title="Permalink to this symbol" href="#ToString:10" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L136">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:11" href="./htmlsrc/std.metastrings.html#L142" kind="template" beg="142" end="145">ToString</a><span class="tparams">(char C)</span>; <a title="Permalink to this symbol" href="#ToString:11" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L142">#</a></dt>
<dd class="ddef">
<div class="summary">Convert constant argument to a string.</div>
<dl>
<dt class="decl">char[] <a class="symbol _variable" name="ToString.ToString" href="./htmlsrc/std.metastrings.html#L77" kind="variable" beg="77" end="77">ToString</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#ToString.ToString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L77">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest" href="./htmlsrc/std.metastrings.html#L147" kind="unittest" beg="147" end="151">unittest</a>; <a title="Permalink to this symbol" href="#unittest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L147">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">template <a class="symbol _template" name="ParseUinteger" href="./htmlsrc/std.metastrings.html#L164" kind="template" beg="164" end="178">ParseUinteger</a><span class="tparams">(string s)</span>; <a title="Permalink to this symbol" href="#ParseUinteger" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L164">#</a></dt>
<dd class="ddef">
<div class="summary">Parse unsigned integer literal from the start of string s.</div>
<p class="sec_header">Returns:</p>.value = the integer literal as a string,
	.rest = the string following the integer literal
<p class="sec_header">Otherwise:</p>.value = null,
	.rest = s
<dl>
<dt class="decl">char[] <a class="symbol _variable" name="ParseUinteger.value" href="./htmlsrc/std.metastrings.html#L167" kind="variable" beg="167" end="167">value</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#ParseUinteger.value" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L167">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">char[] <a class="symbol _variable" name="ParseUinteger.rest" href="./htmlsrc/std.metastrings.html#L168" kind="variable" beg="168" end="168">rest</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#ParseUinteger.rest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L168">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">template <a class="symbol _template" name="ParseInteger" href="./htmlsrc/std.metastrings.html#L191" kind="template" beg="191" end="210">ParseInteger</a><span class="tparams">(string s)</span>; <a title="Permalink to this symbol" href="#ParseInteger" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L191">#</a></dt>
<dd class="ddef">
<div class="summary">Parse integer literal optionally preceded by '-'
 from the start of string s.</div>
<p class="sec_header">Returns:</p>.value = the integer literal as a string,
	.rest = the string following the integer literal
<p class="sec_header">Otherwise:</p>.value = null,
	.rest = s
<dl>
<dt class="decl">char[] <a class="symbol _variable" name="ParseInteger.value" href="./htmlsrc/std.metastrings.html#L194" kind="variable" beg="194" end="194">value</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#ParseInteger.value" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L194">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">char[] <a class="symbol _variable" name="ParseInteger.rest" href="./htmlsrc/std.metastrings.html#L195" kind="variable" beg="195" end="195">rest</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#ParseInteger.rest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L195">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:2" href="./htmlsrc/std.metastrings.html#L212" kind="unittest" beg="212" end="218">unittest</a>; <a title="Permalink to this symbol" href="#unittest:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L212">#</a></dt>
<dd class="ddef"></dd></dl>
</div>
<div id="footer">
  <p>Public Domain</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 03:40:08 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>